import objectUtils from "@/utils/object";

export default objectUtils.freeze(
  (function () {
    // 打包发布时需要更改
    const mode = "off"; // 发布时
    // const mode = "debug"; // 开发时、体验版

    const config = {
      requestKey: "pe46HXRd41e1qKcSY75DKd0LvT4BjcXV",
      hospitalId: "",
      mode: mode,
      imMode: "off",
      baseURL: getBaseURL(),
      baseH5URL: getBaseH5URL(),
      imgURL: "https://guoyi.oss-cn-beijing.aliyuncs.com/",
      largeModelURL: "wss://hlwyy.zjxsh.com/", // 大模型接口地址
      basePDFURL: getBasePDFURL(),
      im: {
        appKey: "dd3977a9053e5970ed2bd1cb940881bb",
      },
      rsa: {
        publicKey:
          "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQvIc4jC5VDp1W6Osh146gfGnKNXazqiZVrEsKmgko/oyiURlAU30J7+p7KjkiDHJypGMwz1z6+rAAKyGxVHNcGMp3Q4eL8cHZyeYo32a/N2Z3ix3eVuf9EV5zv6IbUba6cd9lBShNcM28FJeW5unnzsdsslYyvwE1sjxbqgKdOQIDAQAB",
        privateKey:
          "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANC8hziMLlUOnVbo6yHXjqB8aco1drOqJlWsSwqaCSj+jKJRGUBTfQnv6nsqOSIMcnKkYzDPXPr6sAArIbFUc1wYyndDh4vxwdnJ5ijfZr83ZneLHd5W5/0RXnO/ohtRtrpx32UFKE1wzbwUl5bm6efOx2yyVjK/ATWyPFuqAp05AgMBAAECgYAC0ec0Qf2Ov9yri8hAa+p0+9VMimoc/YGY0vPtE91nkL/K4hRYoIAeEiANc6mzrm4d4x9lbYm8qMYXrH1/KSxJRhsDJLWXJ9qj+jNq6SbMg1Q58TzCQhuitpbCOf1ToNrdg8wrZmh+mhjWrrH0zJ7+RSq9czdsou0FRqIBHCrj8QJBAO95V7o4l7MHVvODPav3rkhS+vXV8L6qTpMWvRbE8urmA34khWwkuyLRIajlgnGDUYFafwjKFI9TzpWSMwmdLykCQQDfJClpXN851f4Fp8+amOh9OqjL3u8v9pqogMzjU+OkOVBLnL7UbVvY1Cab8UJfs+RcYr0Gy87cGxL/0F0g64+RAkEAjs6D3E9nV6Hm3mzDWEvpqMOjWPruCCWzmc+Tj4J/gkkMiCrrTeRRnJ+uPPQw59RxxHvdCbbIr/hAV73JpdAQkQJAP5P9HKEylTcMrq3WsBTbQTsidxwpCIB6JoK0Xh074kHWSAT8NmiGX+xqp8oBAGWwLkaP10zgvsQUEMFcl5GmkQJBAKVWvfSr2+TzTSFMlLbMX5iCmu3semakZNJjfRHSCDBzC9RrwsEpQFPpUKIpkFxJKaSoDT0trN/bCeLUBf7D+Z4=",
      },
    };

    function getBaseURL() {
      if (process.env.NODE_ENV === "production") {
        return "https://ims.meilianshuke.com"; // 开发测试生产
        // return "https://hlwyy.zjxsh.com"; // 开发测试生产
      }
      return "http://192.168.100.64:8102"; // 开发测试生产
      // return "https://hlwyy.zjxsh.com"
			// return "http://127.0.0.1:30227"; // 开发测试生产
			// return "https://controller.zhaoxuezhou.com"; // 王雷
			// return "http://10.38.98.207:48080"; // 白星
			// return "http://wangfan.zhaoxuezhou.com";
			// return "http://10.38.98.25:8018"; // 黄
			// return "https://prodapi.xawellcare.com";
			// return "https://baixing.zhaoxuezhou.com";
    }

    function getBaseH5URL() {
      return "https://ims.meilianshuke.com";
      // return "https://hlwyy.zjxsh.com";
      // if(mode === "off"){
      // 	return "https://prodadmin.xawellcare.com";
      // }else{
      // 	return "https://admin.xawellcare.com";
      // }
    }

    function getBasePDFURL() {
      if (mode === "off") {
        return "https://wechat.imc-xa.cn/api/web/viewer.html?file=https://wechat.imc-xa.cn/api/preview/";
      } else {
        return "https://preapp.imc-xa.cn/api/web/viewer.html?file=https://preapp.imc-xa.cn/api/preview/";
      }
    }

    return config;
  })()
);
